--
-- Created by IntelliJ IDEA.
-- User: rxx78
-- Date: 12. 11. 15
-- Time: 오후 1:27
-- To change this template use File | Settings | File Templates.
--

local scrollProcessor = {}

function scrollProcessor.createScrollProcessor( parent, texturePath )
	local processor = { view = display.newImage( parent, texturePath ) }
	function processor:update( elapsedTime )
		self.view.x = self.view.x - ( elapsedTime * 100 )
	end

	function processor:isInvalid()
		return self.view.contentBounds.xMax < 0
	end

	function processor:destory()
		self.view:removeSelf()
		self = nil
	end

	return processor
end

return scrollProcessor